Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tiptap/extension-list-item

Package Overview
Dependencies
Maintainers
5
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-list-item

list item extension for tiptap

  • 2.10.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created

What is @tiptap/extension-list-item?

@tiptap/extension-list-item is an extension for the Tiptap editor that provides functionality for working with list items. It allows you to create, manipulate, and manage list items within your rich text editor, supporting both ordered and unordered lists.

What are @tiptap/extension-list-item's main functionalities?

Creating List Items

This code demonstrates how to include the ListItem extension in a Tiptap editor instance, enabling the creation of list items.

import { ListItem } from '@tiptap/extension-list-item';

const editor = new Editor({
  extensions: [
    ListItem,
  ],
});

Nested List Items

This code shows how to initialize the editor with nested list items, demonstrating the extension's capability to handle nested lists.

import { ListItem } from '@tiptap/extension-list-item';

const editor = new Editor({
  extensions: [
    ListItem,
  ],
  content: '<ul><li>Item 1<ul><li>Nested Item 1</li></ul></li></ul>',
});

Toggling List Items

This code snippet demonstrates how to toggle a list item using the chainable commands provided by Tiptap.

import { ListItem } from '@tiptap/extension-list-item';

const editor = new Editor({
  extensions: [
    ListItem,
  ],
});

// Toggle a list item
editor.chain().focus().toggleListItem().run();

Other packages similar to @tiptap/extension-list-item

Keywords

FAQs

Package last updated on 26 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc